#include "musicplaylist.h"
#include "ui_musicplaylist.h"

#include <QStandardItemModel>
#include <QVBoxLayout>
#include"musicinfo.h"
musicplaylist::musicplaylist(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::musicplaylist)
{
   ui->setupUi(this);
   setFixedSize(1131,699);
   int h=height()/10;
   ui->label->setFixedSize(width(),h);
   ui->scrollArea->setFixedSize(width(),h*9);


   ui->label->move(0,0);
   ui->scrollArea->move(0,h);

   QVBoxLayout *pLayout = new QVBoxLayout(this);
   vector<MusicInfo*>arr;
   for(int i = 0; i <100; i++)
   {
       MusicInfo*pa=new MusicInfo(false,i+1,"想你","周杰伦","无","3.10",this);
       pLayout->addWidget(pa);//把按钮添加到布局控件中
       arr.push_back(pa);
       //connect(pa,&MusicInfo::doubleClicked,ui->playwidget,&MusicPlayBar::GatherNetWorkData);
   }
   ui->scrollArea->setWidgetResizable(true);
   ui->scrollArea->widget()->setLayout(pLayout);
}

musicplaylist::~musicplaylist()
{
    delete ui;
}

